{% load cmstags murl %}
{% load_settings as settings %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    {% block seo %}
        <title>{{ settings.site_name }} - {{ settings.site_title }}</title>
        <meta name="keywords" content="{{ settings.keywords }}"/>
        <meta name="description" content="{{ settings.description }}"/>
    {% endblock %}
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1271743_wsfpf0xbg6k.css"/>
    {% block css %}
        <link rel="stylesheet" href="{% static 'css/style.css' %}"/>
    {% endblock %}
    {% if settings.header_html %}
        {{ settings.header_html|safe }}
    {% endif %}
    {% block js %}
        {#        <script type="text/javascript" src="{% static 'js/core.js' %}"></script>#}
    {% endblock %}
<body>
<div class="header-wrap">
    <!-- 顶部广告位 -->
    <div class="header">
        {% block back %}
            <div class="back"><a href="javascript:history.back(-1);"><span class="iconfont icon-back"></span></a></div>
        {% endblock %}
        <div class="title">
            {% block title %}{{ settings.site_name }}{% endblock %}
        </div>
        {% block home %}
            <div class="search">
                <a href="{% get_index_url %}">
                    <span class="iconfont icon-home"></span>
                </a>
            </div>
        {% endblock %}
    </div>
</div>

{% block navbar %}

{% endblock %}

<div class="main">
    {% block main %}

    {% endblock %}
</div>
{% block footer_js %}
    <script type="text/javascript">
        window.addEventListener('load', function () {
            document.querySelectorAll("img").forEach(item => {
                if (!item.src || item.src == location.href) {
                    item.src = '/static/image/no_image.png';
                }
            });
        });
    </script>
{% endblock %}
{% include 'mobile/footer.html' %}
</body>
</html>